require("../../../common/manifest.js"), require("../../../common/vendor.js"), global.webpackJsonpMpvue([ 6 ], {
    "4/dB": function(t, e, i) {
        var n = {
            render: function() {
                var t = this, e = t.$createElement, i = t._self._c || e;
                return i("div", [ i("div", {
                    directives: [ {
                        name: "show",
                        rawName: "v-show",
                        value: t.isConnected,
                        expression: "isConnected"
                    } ]
                }, [ i("div", {
                    staticClass: "bg-container"
                }, [ i("scroll-view", {
                    staticClass: "scroll-view",
                    attrs: {
                        "scroll-left": t.scrollDistance,
                        "scroll-top": t.scrollTop,
                        "scroll-x": "",
                        "scroll-with-animation": "",
                        eventid: "1"
                    },
                    on: {
                        scroll: t.handleScroll
                    }
                }, [ i("div", {
                    staticClass: "option-box"
                }, t._l(t.optionArr, function(e, n) {
                    return i("div", {
                        attrs: {
                            id: [ "option" + n ]
                        }
                    }, [ i("div", {
                        staticClass: "option",
                        class: {
                            "option-active": t.optionNum === n
                        },
                        attrs: {
                            eventid: "0_" + n
                        },
                        on: {
                            click: function(e) {
                                t.chooseOption(n);
                            }
                        }
                    }, [ t._v(t._s(e.name)) ]) ]);
                })) ]), t._v(" "), i("div", {
                    staticClass: "bg-box"
                }, t._l(t.bgArr, function(e, n) {
                    return i("div", {
                        staticClass: "bg-wrapper"
                    }, [ i("img", {
                        staticClass: "bg-content",
                        attrs: {
                            src: e.raw.url,
                            mode: t.mode,
                            eventid: "2_" + n
                        },
                        on: {
                            click: function(e) {
                                t.goDetails(n);
                            }
                        }
                    }) ]);
                })) ], 1), t._v(" "), i("img", {
                    directives: [ {
                        name: "show",
                        rawName: "v-show",
                        value: t.isHome,
                        expression: "isHome"
                    } ],
                    staticClass: "home-btn",
                    attrs: {
                        src: "/static/images/home.png",
                        eventid: "3"
                    },
                    on: {
                        click: function(e) {
                            t.goMain();
                        }
                    }
                }) ]), t._v(" "), !t.isConnected && t.isEnter ? i("div", {
                    staticClass: "network-remind"
                }, [ i("img", {
                    staticClass: "remind-icon",
                    attrs: {
                        src: "/static/images/network-remind.png"
                    }
                }), t._v(" "), i("p", [ t._v("网络开小差了~ ") ]) ], 1) : t._e() ]);
            },
            staticRenderFns: []
        };
        e.a = n;
    },
    F1V6: function(t, e, i) {
        Object.defineProperty(e, "__esModule", {
            value: !0
        });
        var n = i("5nAL"), a = i.n(n), o = i("T6Wo");
        new a.a(o.a).$mount();
    },
    Kfxc: function(t, e) {},
    T6Wo: function(t, e, i) {
        var n = i("j6R1"), a = i("4/dB"), o = i("ybqe")(n.a, a.a, function(t) {
            i("Kfxc");
        }, null, null);
        e.a = o.exports;
    },
    j6R1: function(t, e, i) {
        (function(t) {
            e.a = {
                data: function() {
                    return {
                        mode: "aspectFill",
                        optionArr: "",
                        optionNum: 0,
                        bgArr: [],
                        cateId: "",
                        cateName: "",
                        page: 0,
                        isMax: !1,
                        isConnected: !0,
                        isEnter: !1,
                        moveParams: {
                            scrollLeft: 0,
                            subLeft: "",
                            subHalfWidth: "",
                            screenHalfWidth: ""
                        },
                        scrollDistance: "",
                        scrollTop: "",
                        isHome: !1
                    };
                },
                onLoad: function(e) {
                    var i = null;
                    wx.createInterstitialAd && ((i = wx.createInterstitialAd({
                        adUnitId: "adunit-13934bc1d3a77a93"
                    })).onLoad(function() {}), i.onError(function(t) {}), i.onClose(function() {})), 
                    i && i.show().catch(function(t) {
                        console.error(t);
                    });
                    var n = this;
                    this.optionArr = "", this.optionNum = 0, this.setData(), this.isHome = !1, e.channel && (this.isHome = !0), 
                    this.getList(), t.mpvue.setNavigationBarTitle({
                        title: "背景图"
                    }), this.isEnter = !0, t.mpvue.getSystemInfo({
                        success: function(t) {
                            n.moveParams.screenHalfWidth = t.screenWidth / 2;
                        }
                    });
                },
                onShow: function() {
                    6 === this.globalData.scene && (this.globalData.isScene = !0), this.globalData.scene = 1, 
                    t.mpvue.setNavigationBarColor({
                        frontColor: "#000000",
                        backgroundColor: "#ffffff"
                    });
                },
                onHide: function() {
                    this.globalData.scene = 6;
                },
                onReachBottom: function() {
                    this.getList();
                },
                onShareAppMessage: function() {
                    var t = this.globalData.shareArr;
                    return {
                        title: t[Math.floor(Math.random() * t.length)],
                        path: "/pages/bg/result/main?channel=result"
                    };
                },
                mounted: function() {
                    var e = this;
                    t.mpvue.onNetworkStatusChange(function(t) {
                        e.isConnected = t.isConnected;
                    });
                },
                methods: {
                    handleScroll: function(t) {
                        this.moveParams.scrollLeft = t.target.scrollLeft;
                    },
                    setData: function() {
                        this.page = 0, this.bgArr = [], this.isMax = !1, this.cateId = "";
                    },
                    chooseOption: function(e) {
                        if (this.optionNum !== e) {
                            this.optionNum = e;
                            var i = "#option" + e;
                            this.getRect(i), this.setData(), this.cateId = this.optionArr[e].id, t.mpvue.pageScrollTo({
                                scrollTop: 0,
                                duration: 300
                            }), this.getList();
                        }
                    },
                    getRect: function(e) {
                        var i = this;
                        t.mpvue.createSelectorQuery().select(e).boundingClientRect(function(t) {
                            i.moveParams.subLeft = t.left, i.moveParams.subHalfWidth = t.width / 2, i.moveOption();
                        }).exec();
                    },
                    moveOption: function() {
                        var t = this.moveParams, e = t.subLeft - t.screenHalfWidth + t.subHalfWidth;
                        this.scrollDistance = t.scrollLeft + e;
                    },
                    goMain: function() {
                        t.mpvue.reLaunch({
                            url: "/pages/main/index/main"
                        });
                    },
                    goDetails: function(e) {
                        var i = "/pages/main/details/main?tag=bg&index=" + e + "&cateId=" + this.cateId + "&page=" + this.page;
                        t.mpvue.setStorage({
                            key: "wallpaperArr",
                            data: this.bgArr,
                            success: function(e) {
                                t.mpvue.navigateTo({
                                    url: i
                                });
                            }
                        });
                    },
                    getList: function() {
                        var e = this;
                        this.page++, this.isMax || t.mpvue.request({
                            url: "https://news.moxiu.com/applets/wallpaper/bGPic",
                            method: "GET",
                            dataType: "json",
                            data: {
                                cateId: this.cateId,
                                page: this.page
                            },
                            header: {
                                "content-type": "application/json"
                            },
                            success: function(t) {
                                e.optionArr || (e.optionArr = t.data.data.cate), e.bgArr = e.bgArr.concat(t.data.data.list), 
                                e.page >= t.data.data.meta.pages && (e.isMax = !0);
                            },
                            fail: function(e) {
                                t.mpvue.showToast({
                                    title: "网络异常，请稍后再试",
                                    icon: "none"
                                });
                            }
                        });
                    }
                }
            };
        }).call(e, i("DuR2"));
    }
}, [ "F1V6" ]);